// 前台
export const headerNav = [
    {
        path: '/clients',
        name: '首页'
    },
    {
        path: '/clients/about-us',
        name: '走进我们'
    },
    {
        path: '/clients/news-center',
        name: '新闻中心'
    },
    {
        path: '/clients/product-display',
        name: '企业产品'
    },
    {
        path: '/clients/after-sales',
        name: '售后保障'
    }
]
export const productNav = [
    {
        path: 'basketball',
        name: '一次电池'
    },
    {
        path: 'outdoor',
        name: '二次电池'
    },
    {
        path: 'sport',
        name: '燃料电池'
    },
    {
        path: 'children',
        name: '普通蓄电池'
    },
    {
        path: 'court',
        name: '干荷蓄电池'
    },
    {
        path: 'entertainment',
        name: '免维护蓄电池'
    }
]
// 后台
export const sider = [
    {
        path: '/admin',
        name: '首页'
    },
    {
        path: '/admin/config',
        name: '配置中心'
    },
    {
        path: '/admin/users',
        name: '用户管理'
    },
    {
        path: '/admin/battery',
        name: '电池管理'
    },
    {
        path: '/admin/power-station',
        name: '电站管理'
    },
    {
        path: '/admin/contract',
        name: '租赁合同'
    },
    {
        path: '/admin/maintenance',
        name: '维护记录'
    },
    {
        path: '/admin/payment',
        name: '支付情况'
    },
    {
        path: '/admin/recycle',
        name: '回收记录'
    },
    {
        path: '/admin/conversation',
        name: '会话中心'
    },
    {
        path: '/admin/trend',
        name: '趋势分析'
    },
]
//取字典的方法
export const getDictionary = (keyArr: string[]) => {
    const dictionary = [...headerNav, ...productNav, ...sider]
    let result:any = []
    keyArr.forEach(key => {
        const obj = dictionary.find(item => item.path === key)
        result.push(obj)
    })
    return result
}